package com.jackeysun.common_kit

import android.app.Application
import android.util.Log
import com.jackeysun.log.LogConfig
import com.jackeysun.util.Application.mApplication
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch

/**
 *   Created by sunxunchao on 2021/12/10.
 */
class App : Application() {

    override fun onCreate() {
        super.onCreate()
        mApplication = this


        LogConfig
            .toWrite(true)
            .versionCode(BuildConfig.VERSION_CODE)
            .versionName(BuildConfig.VERSION_NAME)
            .fileSize(100 * 1024L)
            .toUseShake(true)
            .saveFileTime(24 * 60 * 60 * 1000L)
            .builder(this)


        var i = 1111111111111119
        GlobalScope.launch {
            while (true){
                delay(1000)
                Log.d("TAG", "onCreate: test ${i++}")
            }
        }
    }
}